<?xml version="1.0" ?>
<container xmlns="http://symfony.com/schema/dic/services"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd">

    <services>
        <!-- Manager -->

        <service id="security.authenticator.manager"
                 class="Symfony\Component\Security\Http\Authentication\AuthenticatorManager"
                 abstract="true"
        >
            <tag name="monolog.logger" channel="security" />
            <argument type="abstract">authenticators</argument>
            <argument type="service" id="security.token_storage" />
            <argument type="service" id="event_dispatcher" />
            <argument type="abstract">provider key</argument>
            <argument type="service" id="logger" on-invalid="null" />
            <argument>%security.authentication.manager.erase_credentials%</argument>
        </service>

        <service id="security.authenticator.managers_locator"
                 class="Symfony\Component\DependencyInjection\ServiceLocator">
            <argument type="collection" />
        </service>

        <service id="security.user_authenticator"
                 class="Symfony\Bundle\SecurityBundle\Security\UserAuthenticator">
            <argument type="service" id="security.firewall.map" />
            <argument type="service" id="security.authenticator.managers_locator" />
            <argument type="service" id="request_stack" />
        </service>
        <service id="Symfony\Component\Security\Http\Authentication\UserAuthenticatorInterface" alias="security.user_authenticator" />

        <service id="security.authentication.manager"
                 class="Symfony\Component\Security\Http\Authentication\NoopAuthenticationManager"/>
        <service id="Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface" alias="security.authentication.manager" />

        <service id="security.firewall.authenticator"
                 class="Symfony\Component\Security\Http\Firewall\AuthenticatorManagerListener"
                 abstract="true">
            <argument type="abstract">authenticator manager</argument>
        </service>

        <!-- Listeners -->

        <service id="security.listener.check_authenticator_credentials" class="Symfony\Component\Security\Http\EventListener\CheckCredentialsListener">
            <tag name="kernel.event_subscriber" />
            <argument type="service" id="security.encoder_factory" />
        </service>

        <service id="security.listener.password_migrating" class="Symfony\Component\Security\Http\EventListener\PasswordMigratingListener">
            <tag name="kernel.event_subscriber" />
            <argument type="service" id="security.encoder_factory" />
        </service>

        <service id="security.listener.user_checker" class="Symfony\Component\Security\Http\EventListener\UserCheckerListener" abstract="true">
            <argument type="abstract">user checker</argument>
        </service>

        <service id="security.listener.session"
                 class="Symfony\Component\Security\Http\EventListener\SessionStrategyListener"
                 abstract="true">
            <argument type="service" id="security.authentication.session_strategy" />
        </service>

        <service id="security.listener.remember_me"
                 class="Symfony\Component\Security\Http\EventListener\RememberMeListener"
                 abstract="true">
            <tag name="monolog.logger" channel="security" />
            <argument type="abstract">remember me services</argument>
            <argument type="service" id="logger" on-invalid="null" />
        </service>

        <!-- Authenticators -->

        <service id="security.authenticator.http_basic"
                 class="Symfony\Component\Security\Http\Authenticator\HttpBasicAuthenticator"
                 abstract="true">
            <tag name="monolog.logger" channel="security" />
            <argument type="abstract">realm name</argument>
            <argument type="abstract">user provider</argument>
            <argument type="service" id="logger" on-invalid="null" />
        </service>

        <service id="security.authenticator.form_login"
                 class="Symfony\Component\Security\Http\Authenticator\FormLoginAuthenticator"
                 abstract="true">
            <argument type="service" id="security.http_utils" />
            <argument type="abstract">user provider</argument>
            <argument type="abstract">authentication success handler</argument>
            <argument type="abstract">authentication failure handler</argument>
            <argument type="abstract">options</argument>
        </service>

        <service id="security.authenticator.json_login"
                 class="Symfony\Component\Security\Http\Authenticator\JsonLoginAuthenticator"
                 abstract="true">
            <argument type="service" id="security.http_utils" />
            <argument type="abstract">user provider</argument>
            <argument type="abstract">authentication success handler</argument>
            <argument type="abstract">authentication failure handler</argument>
            <argument type="abstract">options</argument>
            <argument type="service" id="property_accessor" on-invalid="null" />
        </service>

        <service id="security.authenticator.remember_me"
                 class="Symfony\Component\Security\Http\Authenticator\RememberMeAuthenticator"
                 abstract="true">
            <argument type="abstract">remember me services</argument>
            <argument>%kernel.secret%</argument>
            <argument type="service" id="security.token_storage" />
            <argument type="abstract">options</argument>
            <argument type="service" id="security.authentication.session_strategy" />
        </service>

        <service id="security.authenticator.x509"
                 class="Symfony\Component\Security\Http\Authenticator\X509Authenticator"
                 abstract="true">
            <tag name="monolog.logger" channel="security" />
            <argument type="abstract">user provider</argument>
            <argument type="service" id="security.token_storage"/>
            <argument type="abstract">firewall name</argument>
            <argument type="abstract">user key</argument>
            <argument type="abstract">credentials key</argument>
            <argument type="service" id="logger" on-invalid="null" />
        </service>

        <service id="security.authenticator.remote_user"
                 class="Symfony\Component\Security\Http\Authenticator\RemoteUserAuthenticator"
                 abstract="true">
            <tag name="monolog.logger" channel="security" />
            <argument type="abstract">user provider</argument>
            <argument type="service" id="security.token_storage"/>
            <argument type="abstract">firewall name</argument>
            <argument type="abstract">user key</argument>
            <argument type="service" id="logger" on-invalid="null" />
        </service>
    </services>
</container>
